function [matches imposters] = matchesAndImposters(dists,testLab,trainLab)
%MATCHESANDIMPOSTERS Summary of this function goes here
%   Detailed explanation goes here

%find matches and imposters
matches=[];
imposters=[];
 
 for i=1:size(dists,1)
     testLbl = testLab(i);
     [C,I]=min(dists(i,:));
     matchLbl=trainLab(I(1));
     
     if(matchLbl ~= testLbl)
        %false positive
         imposters=[imposters;C(1)];
     else
         %true positive
         matches=[matches;C(1)];
     end
 end
end

